package com.hl.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Liu Huan
 */
@Component  //添加为spring组件，添加到spring容器
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Dog {
	@Value("旺财")//使用value直接赋值
	private String name;
	@Value("14")
	private Integer age;
}
